import { Controller, Get, Post, Body, Patch, Param, Delete, Query } from '@nestjs/common';
import { CustomFlowService } from './custom-flow.service';
import { CreateCustomFlowDto } from './dto/create-custom-flow.dto';
import { UpdateCustomFlowDto } from './dto/update-custom-flow.dto';

@Controller('custom-flow')
export class CustomFlowController {
  constructor(private readonly customFlowService: CustomFlowService) { }

  @Post()
  create(@Body() createCustomFlowDto: CreateCustomFlowDto) {
    return this.customFlowService.create(createCustomFlowDto);
  }

  @Get()
  findAll(@Query() querys) {
    return this.customFlowService.findAll(querys);
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.customFlowService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateCustomFlowDto: UpdateCustomFlowDto) {
    return this.customFlowService.update(id, updateCustomFlowDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.customFlowService.remove(id);
  }
}
